package Day3_07_24;

import java.util.Scanner;

//用*输出三角形
public class TriangleBy8 {
	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		System.out.println("输入三角形的高(整数)：");
		int height = scanner.nextInt();
		for (int i = 1; i <= height; i++) {
			for (int j = height; j >= i; j--) {
				System.out.print(" ");
			}
			for (int j = 1; j <= (2 * i - 1); j++) {
				System.out.print("*");
			}
			System.out.println();
		}
	}
}
